{php include wl_template('common/header');}
<ul class="nav nav-tabs">
	<li class="active">
        <a href="{php echo web_url('data/log', array('op' => 'display'))}">退款列表</a>
    </li>
</ul>
{if $op=='display'}
<div class="main">
    <div class="panel panel-info">
	    <div class="panel-heading">筛选</div>
	    <div class="panel-body">
            <form action="./index.php" method="get" class="form-horizontal" role="form" id="form1">
                <input type="hidden" name="c" value="site" />
                <input type="hidden" name="a" value="entry" />
                <input type="hidden" name="m" value="lexiangpingou" />
                <input type="hidden" name="do" value="data" />
				<input type="hidden" name="ac" value="system_log" />
                <div class="form-group">
                        <label class="col-xs-12 col-sm-4 col-md-4 col-lg-1 control-label">操作时间</label>
                        <div class="col-sm-5 col-lg-7 col-xs-12">
                            {php echo tpl_form_field_daterange('time', array('starttime'=>date('Y-m-d', $starttime),'endtime'=>date('Y-m-d', $endtime)));}
                        </div>
                        <div class="col-sm-3 col-lg-2" style="text-align:right;"><button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
                        </div>
                    </div>
                <div class="form-group">
                </div>
            </form>
            <!--<div class="form-group">
                <label class="col-xs-12 col-sm-4 col-md-4 col-lg-1 control-label" style="text-align: right;padding-right: 30px;">导出订单</label>
            	<a href='{php echo $this->createWebUrl('order', array('op' => 'output','status'=>$status,'keyword'=>$keyword,'transid'=>$transid,'member'=>$member,'pay_type'=>$pay_type,'starttime'=>$starttime,'endtime'=>$endtime,'time'=>$time))}'>
            		<button class="btn btn-info"><i class="fa fa-download"></i> 导出订单</button>（如果按条件导出请先选择条件后查询，再导出。）
            	</a>
	   		</div>-->
	   		<!--<a href='{php echo $this->createWebUrl('order', array('op' => 'refundall'))}'><button class="btn btn-danger"><i class="fa fa-align-justify"></i> 一键退款</button></a>-->
	    </div>
	</div>

	<div class="panel panel-default">
		<div class="panel-body table-responsive">
			<table class="table table-hover">
				<thead class="navbar-inner">
					<tr>
						<th style="width:60px;">操作用户</th>
						<th style="width:80px;">操作描述</th>
						<th style="width:380px;">操作界面</th>
						<th style="width:100px;">操作时间</th>
						<th style="width:60px; text-align:right;"></th>
					</tr>
				</thead>
				<tbody>
					{loop $list $item}
					<tr>
						<td>{$item['user']}</td>
						<td>{$item['describe']}</td>
						<td><font size="1">{$item['view_url']}</font></td>
						<td>{php echo date('Y-m-d H:i:s',$item['createtime'])}</td>
						<td style="text-align:right;">
							<a href="{php echo web_url('data/system_log/detail', array('id' => $item['id']))}" class="btn btn-success btn-sm">查看详情</a>
						</td>
					</tr>
					{/loop}
				</tbody>
			</table>
		</div>
	</div>
</div>
{$pager}
<script type="text/javascript">
	require(['daterangepicker'], function($){
		$('.daterange').on('apply.daterangepicker', function(ev, picker) {
			$('#form1')[0].submit();
		});
	});
</script>


<script>
	require(['bootstrap'],function($){
		$('.btn').hover(function(){
			$(this).tooltip('show');
		},function(){
			$(this).tooltip('hide');
		});
	});
</script>
{/if}
{if $op=='detail'}
<div class="main">
<div class="clearfix">
	<!-- 筛选功能 -->
		<!-- 操作日志 -->
		<div class="panel panel-default">
		<div class="panel-heading">
			操作日志
		</div>
		<div class="table-responsive panel-body">
			<form class="form-horizontal" action="" method="post">
						<div class="form-group">
				<label class="col-md-2 control-label">操作用户</label>
				<div class="col-md-10">
					<span class="help-block">{$item['user']}</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-md-2 control-label">操作描述</label>
				<div class="col-md-10">
					<span class="help-block"><span class="label label-warning">{$item['describe']}</span></span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-md-2 control-label">操作时间</label>
				<div class="col-md-10">
					<span class="help-block">{php echo date('Y-m-d H:i:s',$item['createtime'])}</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-md-2 control-label">操作IP</label>
				<div class="col-md-10">
					<span class="help-block"><span class="label label-info">{$item['ip']}</span></span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-md-2 control-label">操作页面</label>
				<div class="col-md-10">
					<span class="help-block"><a href="javascript:;" class="js-copy">{$item['view_url']}</a><div class="zclip" id="zclip-ZeroClipboardMovie_1" style="position: absolute; left: 15px; top: 5px; width: 442px; height: 20px; z-index: 99;"><embed id="ZeroClipboardMovie_1" src="./resource/components/zclip/ZeroClipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="442" height="22" name="ZeroClipboardMovie_1" align="middle" allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=1&amp;width=442&amp;height=22" wmode="transparent"></div></span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-md-2 control-label">数据记录</label>
				<div class="col-md-10">
					<span class="help-block">{$item['data']}</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-md-2 control-label"></label>
				<div class="col-md-10">
					<span class="help-block"><a href="javascript:history.go(-1);" class="btn btn-primary min-width">返回</a></span>
				</div>
			</div>
			<script>
			$(function(){
				$('a.js-copy').each(function(){
					util.clip(this);
				});
			});
			</script>
					</form></div>
	</div>
		<!-- 系统日志 -->
		<!-- 数据据日志 -->
	</div>
<script type="text/javascript">
	$('#checkAll').click(function() {
		var isChecked = $(this).prop("checked");
		$('input[type="checkbox"]').each(function() {
			$(this).prop("checked", isChecked);
		});
	})
</script>
			</div>
{/if}
<script>
$(function () {
	var list_group_item = document.querySelectorAll(".list-group-item"),
		listlength = list_group_item.length,
		urlstring = location.href
	
		for (var i = 0; i < listlength; i++ ) {
			list_group_item[i].classList.remove("active");		
		}
		list_group_item[3].classList.add("active");
	
})
</script>
{template 'common/footer'}